package bmatch.tech.cloud.config;


import bmatch.tech.cloud.auth.TokenNeeded;
import bmatch.tech.cloud.resource.CloudResource;
import bmatch.tech.cloud.resource.DirectoryResource;
import bmatch.tech.cloud.resource.FileResource;
import bmatch.tech.cloud.resource.TokenNeededFilter;
import bmatch.tech.cloud.resource.UserResource;
import org.glassfish.jersey.media.multipart.MultiPartFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.springframework.stereotype.Component;


/**
 * JerseyConfig的注释
 *
 * @author: Awake
 * @date: 2018-12-04 22:10
 **/
@Component
public class JerseyConfig extends ResourceConfig {
    public JerseyConfig() {
        //文件上传支持
        register(MultiPartFeature.class);

        register(CloudResource.class);
        register(DirectoryResource.class);
        register(FileResource.class);
        register(TokenNeededFilter.class);
        register(UserResource.class);
    }
}
